<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>万信管理后台</title>
    <%@ include file="/commons/meta.jsp"%>
    <link rel="stylesheet" href="${ctx}/resources/admin/css/login.css" type="text/css" />
    <link rel="stylesheet" href="${ctx}/resources/admin/css/base.css" type="text/css" />
	<link rel="stylesheet" href="${ctx}/resources/artDialog/skins/default.css" type="text/css" />
</head>
<body>
    <div id="header">
        <div class="logo"><img src="${ctx}/resources/admin/images/logo.png" /></div>
    </div>
    <div id="login_main" class="login_main clearfix">
        <div class="login_pic box_bottom" id="login_pic">
            <ul class="pic_roll_main" id="pic_roll_main">
                <li><img src="${ctx}/resources/admin/images/login_banner01.jpg" alt="" title="" /></li>
                <li><img src="${ctx}/resources/admin/images/login_banner03.jpg" alt="" title="" /></li>
            </ul>
        </div>
        <div class="login_form_outer">
            <div class="login_form_main">
            
                <ul id="login_sort" class="main_ul">
                    <li>
                    	<form method="post" id="loginform" name="loginform">
	                        <div class="login_top"><h1>用户登录</h1></div>
	                        <div class="login_list_outer clearfix">
	                            <ul class="login_list">
	                                <li>
	                                    <input type="text" class="login_input inputTextClean_b dl" value="" id="login"  name="login"/>
	                                    <b class="input_tip">请输入您的帐号</b>
	                                </li>
	                                <li>
	                                    <input type="password" class="login_input inputTextClean_b dl" value="" id="pwd" name="pwd" />
	                                    <b class="input_tip">请输入您的密码</b>
	                                </li>
	                                <li>
	                                    <input type="text" class="login_input inputTextClean_b yzm dl" value="" id="code" name="code" />
	                                    <b class="input_tip">请输入验证码</b>
	                                    <img class="yzm_img" onclick="this.src='${ctx}/jsps/common/verifyCode.jsp?d='+Math.random();" src="${ctx}/jsps/common/verifyCode.jsp"/>
	                                </li>
	                                <li class="login_submit">
	                                    <label><input id="remeber" type="checkbox" value="checkbox" name="remeber"> 自动登录</label>
	                                    <a href="javascript:;" id="btn_forget_password">找回密码</a>
	                                </li>
	                            </ul>
	                        </div>
	                        <div class="login_btn"><h1><a href="javascript:;" class="yellow_btn" id="btnlogin" onclick="subFrm()">登 录</a></h1></div>
                    	</form>
                    </li>
                    <li>
                        <div class="login_top"><h1>找回密码</h1></div>
                        <div id="get_password_step1">
                            <div class="login_list_outer clearfix">
                                <ul class="login_list get_password">
                                    <li class="tip_title">请输入您的邮箱或手机号码</li>
                                    <li>
                                        <input type="text" class="login_input inputTextClean_b zhmm" value="" />
                                    </li>
                                    <li class="tip_main"><i></i>请输入您的手机号或邮箱，可以获取临时密码，如果您还有其他问题，请联系我们客服。</li>
                                </ul>
                            </div>
                            <div class="get_password_btn">
                                <a href="javascript:;" class="yellow_btn get_pass_btn">找回密码</a>
                                <a href="javascript:;" class="gray_btn goto_login_btn"><i></i>返回登录</a>
                            </div>
                        </div>
                        <div id="get_password_step2" class="hidden">
                            <div class="login_list_outer clearfix">
                                <ul class="login_list get_password">
                                    <li class="step2_tip_main"><b></b><i></i>您的密码已经成功取回，请注意查收邮件或查看短信，邮箱链接24小时内有效。</li>
                                    <li class="tip_click">没有收到邮件，点击<a href="javascript:;">重新发送邮件</a></li>
                                </ul>
                            </div>
                            <div class="password_step2">
                                <a href="javascript:;" class="yellow_btn goto_login_btn">重新登录</a>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div id="footer" style="position: absolute;bottom: 0;width: 100%">
        Copyright © 1995 - 2013 SXIT. All Rights Reserved.  万达集团 版权所有
    </div>
<script src="${ctx}/resources/admin/js/lib/jquery-1.8.0.min.js"></script>
<script src="${ctx}/resources/admin/js/login.js"></script>
<script src="${ctx}/resources/artDialog/artDialog.source.js"></script>
<script type="text/javascript">
artDialog.tips = function (content, time) {
    return artDialog({
        id: 'Tips',
        title: false,
        cancel: false,
        fixed: true,
        lock: false,
        follow: document.getElementById('btnlogin')
    })
    .content('<div style="padding: 0 1em;">' + content + '</div>')
    .time(time || 1);
};
function subFrm(){
	var userName = $("#login").val();
	var userPassword = $("#pwd").val();
	if (null == userName || '' == userName) {
		$("#cg1").removeClass("success").addClass("error");
		$("#login").focus();
		return false;
	} else {
		$("#cg1").removeClass("error");
	}
	if (null == userPassword || '' == userPassword) {
		$("#cg2").removeClass("success").addClass("error");
		$("#pwd").focus();
		return false;
	} else {
		$("#cg2").removeClass("error");
	}
	
	 var posta =$("#loginform").serialize();
	 $.post("${ctx}/admin/login!checkLogin.xhtml",posta,function (data){
		if(data.status == "success"){
			loginform.action = "${ctx}/admin/login!index.xhtml";
			loginform.submit();
		}else {
			art.dialog.tips(data.message);
		}
	},"json"); 
}
</script>
</body>
</html>